package demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

import com.jfinal.core.Controller;

import demo.service.TestService;

public class HelloController extends Controller {
	public static int i=0;
	@Autowired
	private TestService service;

	@Autowired
	public void setApplicationContext(ApplicationContext ctx) {
		System.out.println("HelloController attr[ApplicationContext] 已出入。。");
	}

	public HelloController() {
		System.out.println("create HelloController i=" + (i++));
	}

	public void index() {
		service.update();
		renderText("Hello JFinal World.");
	}

	public void t() {
		renderText("Hello JFinal World.");
	}
}
